<?php
require_once("./vo/com/artxis/cms/vo/MenuAdminVO.php");
require_once("config.php");
class MenuAdminService {
	function MenuAdminService()

	{
			//connect to the database.
			$mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD);
			mysql_select_db(DATABASE_NAME);
	}
  public function GetMenuAdmin()
    {	

	$sql =  mysql_query("SELECT*FROM menu_admin");

	$listMenu = array();
	while($tableData = mysql_fetch_array($sql)){
		

		 $menuAdminVO = new MenuAdminVO();
		 $menuAdminVO->id = $tableData["id"];
		 $menuAdminVO->name   = $tableData["name"];
		 $menuAdminVO->url = $tableData["url"];
         $menuAdminVO->icon = $tableData["icon"];
		 $listMenu[] = $menuAdminVO; 

		 }
	   
		return $listMenu;


    }

}

?>
